package com.xiyi_design.printer_manage;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import tk.mybatis.spring.annotation.MapperScan;

@Configuration
@SpringBootApplication
@MapperScan({"com.xiyi_design.printer_manage.dao.master","com.xiyi_design.printer_manage.dao.slave"})
public class PrinterManageApplication  extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(PrinterManageApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(PrinterManageApplication.class);
    }
    
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
